<?php
/**
 * Joomla! 1.5 component JoomGPSTracks
 *
 * @version $Id: default.php 2009-06-24 15:40:19 svn $
 * @author Michael Pfister
 * @package joomGPStracks
 * @subpackage frontend
 * @license GNU/GPL
 * @filesource
 *
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

echo $this->lh;
?>
<table width="100%" class="tracktable" >
    <thead>
        <tr class="sectiontableheader">
            <th width="100px" align="center"><?php echo JText::_('GPS_CAT'); ?></th>
            <th width="100px" align="center"><?php echo JText::_('GPS_SUBCAT'); ?></th>
            <th align="center"><?php echo JText::_('GPS_DESCRIPTION'); ?></th>
        </tr>
    </thead>
    <tbody>
    <?php
        $k = 0;
        for($i=0, $n=count($this->cats); $i<$n; $i++) {
            $cat = $this->cats[$i];
            $link = JRoute::_('index.php?option=com_joomgpstracks&view=tracks&layout=list&search='.$cat->title);
            ?>
    <tr class="sectiontableentry<?php echo $k; ?>">
        <td>
            <?php if($cat->parent == 0): ?>
            <b><a href="<?php echo $link; ?>" ><?php echo str_replace('.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<sup>|_</sup>','&bull;',$cat->treename).$cat->title; ?></a></b>
            <?php else: ?>
            <b>----</a></b>
            <?php endif; ?>
        </td>
        <td>
            <?php if($cat->parent == 0): ?>
            <b>----</b>
        <?php else: ?>
            <b><a href="<?php echo $link; ?>" ><?php echo $cat->title; ?></a></b>
            <?php endif; ?>
        </td>
        <td><?php echo $cat->description; ?></td>
    </tr>
            <?php
        $k = 1 -$k;
        }
    ?>
    </tbody>
</table>

<?php
echo $this->footer;
?>
